package com.huawei.appgallery.assistantdock.subaccount;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import com.huawei.secure.android.common.intent.SafeIntent;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import o.ayw;
import o.beo.f;
import o.biy;
import o.BaseAlertDialog;
import o.BaseAlertDialog.a;
import o.cks;

public class GameSubAccountSwitchActivity extends Activity implements cks {
    private BaseAlertDialog ˎ = null;
    private String ˏ;
    private boolean ॱ;

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        requestWindowFeature(1);
        ayw.ॱ(this);
        getWindow().setFlags(WXMediaMessage.DESCRIPTION_LENGTH_LIMIT, WXMediaMessage.DESCRIPTION_LENGTH_LIMIT);
        View view = new View(this);
        view.setAlpha(0.0f);
        setContentView(view);
        this.ˏ = new SafeIntent(getIntent()).getStringExtra("packageName");
        ˋ(this.ˏ);
    }

    protected void onDestroy() {
        super.onDestroy();
        if (this.ˎ != null) {
            this.ˎ.ˏ();
            this.ˎ = null;
        }
    }

    private void ˋ(String str) {
        String string;
        this.ॱ = biy.ॱ(str);
        if (this.ॱ) {
            string = getResources().getString(f.ᐨ);
        } else {
            string = getResources().getString(f.ᐝˊ);
        }
        String string2 = getResources().getString(f.ॱॱ);
        this.ˎ = BaseAlertDialog.ˋ(this, getResources().getString(f.ᐧ), getResources().getString(f.ᐝᐝ));
        this.ˎ.ˎ(this);
        this.ˎ.ॱ();
        this.ˎ.ॱ(a.ˋ, string);
        this.ˎ.ॱ(a.ˎ, string2);
    }

    public void enableNetworking() {
        if (this.ॱ) {
            biy.ॱ(this.ˏ, false);
        } else {
            biy.ॱ(this.ˏ, true);
        }
        finish();
    }

    public void upgrade() {
        finish();
    }

    public void ˋ() {
        finish();
    }
}
